package org.four.web.service;

import org.four.common.model.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

@FeignClient(name="user-module")
public interface UserService {

    //查询树
    @RequestMapping(value = "/user/findTree")
    List<NavBean> findTree();

    //注册
    @RequestMapping(value = "/user/testAccount")
    UserBean testAccount(@RequestParam("account")String account);

    //注册
    @RequestMapping(value = "/user/saveUser")
    void saveUser(@RequestBody UserBean userBean);

    //用户账号登陆
    @RequestMapping("/user/login")
    Map login(@RequestBody UserBean userBean);

    //新增简历
    @RequestMapping("/user/upda")
    void upda(@RequestBody ProductBean productBean);

    //新增简历
    @RequestMapping("/user/addUser")
    void addUser(@RequestBody ProductBean productBean);

    //查询商品列表
    @RequestMapping("/user/queryProduct")
    LayuiPage queryProduct(@RequestParam("limit") int limit, @RequestParam("page") int page, @RequestParam("id")Integer id);

    //简历回显
    @RequestMapping("/user/findProductInfo")
    ProductBean findProductInfo(@RequestParam("id") Integer id);

    //投递简历
    @RequestMapping("/user/toudi")
    LayuiPage toudi(@RequestParam("limit") int limit, @RequestParam("page") int page,@RequestParam("id")  Integer id);

    //新增职位和修改职位
    @RequestMapping(value = "/user/updacjq")
    void updacjq(@RequestBody ZhiweiBean zhiweiBean);

    //新增职位和修改职位
    @RequestMapping(value = "/user/addProductcjq")
    void addProductcjq(@RequestBody ZhiweiBean zhiweiBean);

    //查询商品列表
    @RequestMapping(value="/user/queryProductcjq")
    LayuiPage queryProductcjq(@RequestParam("id")Integer id);

    //收藏查询列表
    @RequestMapping(value="/user/queryzhiwei")
    LayuiPage queryzhiwei(@RequestParam("limit")int limit,  @RequestParam("page")int page);

    //订阅查询列表
    @RequestMapping(value="/user/querydingyue")
    LayuiPage querydingyue(@RequestParam("limit") int limit, @RequestParam("page") int page, @RequestBody  ZhiweiBean zhiweiBean);

    //删除收藏管理
    @RequestMapping("/user/delcjq")
    void delcjq(@RequestParam("id")Integer[] id);

    //删除订阅
    @RequestMapping("/user/del2")
    void del2(@RequestParam("id")Integer[] id);

    //账号设置查询
    @RequestMapping(value="/user/haolist")
    LayuiPage haolist(@RequestParam("limit")int limit, @RequestParam("page")int page);

    //账号设置
    @RequestMapping(value = "/user/zhanggai")
    void zhanggai(@RequestBody UserBean userBean);

    //测试
    @RequestMapping(value = "/user/queryList")
    LayuiPage queryList(@RequestParam("page") Integer page,@RequestParam("limit") Integer limit,@RequestParam("sort") Integer sort, @RequestBody ZhaoPinBean zhaoPinBean);

    //查询类型
    @RequestMapping(value = "/user/queryType")
    List<ComUserBean> queryType();

    //创建索引
    @RequestMapping("/user/findZhaoPin")
    List<ZhaoPinBean> findZhaoPin();

    //跳转
    @RequestMapping("/user/jiekou")
    List<ZhaoPinBean> findProductListImg();

    //根据id查询商品详情
    @RequestMapping("/user/queryProductById")
    List<Map> queryProductById(@RequestParam("id")Integer id);

    //订阅回显
    @RequestMapping("/user/findyue")
    ZhiweiBean findyue(@RequestParam("id") Integer id);

    //投递简历
    @RequestMapping("/user/addli")
    void addli(@RequestBody ToudiBean toudiBean);

    @RequestMapping("/user/productState")
    void productState(@RequestParam("id")Integer id);

    @RequestMapping("/user/JingYanBean")
    LayuiPage queryXiangMu(@RequestParam("id") Integer id);

    @RequestMapping("/user/addXiangmu")
    void addXiangmu(@RequestBody JingYanBean jingYanBean);

    @RequestMapping("/user/delXiangMu")
    void delXiangMu(@RequestParam("id") Integer id);

    @RequestMapping("/user/addtoudi")
    void addtoudi(@RequestParam("comid")Integer comid,@RequestParam("userid") Integer userid);

    //修改 用户密码
    @RequestMapping("/user/updatePassWord")
    void updatePassWord(@RequestParam("id") Integer id, @RequestParam("md532") String md532);

    //教育查询
    @RequestMapping("/user/findJiaoYu")
    ResultBean findJiaoYu(@RequestParam("id") Integer id);

    //删除教育经历
    @RequestMapping("/user/delJiaoYu")
    void delJiaoYu(@RequestParam("id") Integer id);

    //新增教育经历
    @RequestMapping("/user/saveJiaoYu")
    void saveJiaoYu(@RequestBody JiaoYuBen jiaoYuBen);
    /**
     * 根据userId 查询具体的数据
     * @param id
     * @return
     */
    @RequestMapping("/user/findQueryUserList")
    UserBean findQueryUserList(@RequestParam("id")Integer id);

    /**
     * 工作经历表
     * @param id
     * @return
     */
    @RequestMapping("/user/findUserGongZuoJingLi")
    ResultBean findUserGongZuoJingLi(@RequestParam("id")Integer id);

    /**
     * 删除工作经历
     * @param id
     */
    @RequestMapping("/user/delGongZuo")
    void delGongZuo(@RequestParam("id")Integer id);

    /**
     * 新增工作经历
     * @param gongZuoBean
     */
    @RequestMapping("/user/saveGongZuo")
    void saveGongZuo(@RequestBody GongZuoBean gongZuoBean);
    @RequestMapping("/user/queryjituan")
    List<Map> queryjituan(@RequestParam("comid")Integer comid);
}
